package cn.lingyangwl.agile.pay.mch.controller.order;

import cn.lingyangwl.framework.core.response.Resp;
import cn.lingyangwl.agile.pay.model.entity.MchNotifyRecord;
import cn.lingyangwl.agile.pay.model.rqrs.MchNotifyQL;
import cn.lingyangwl.agile.pay.common.service.MchNotifyRecordService;
import cn.lingyangwl.agile.ram.ActionType;
import cn.lingyangwl.agile.ram.RamResource;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @author shenguangyang
 */
@RestController
@RequestMapping("/mchNotify")
public class MchNotifyController {
    @Resource
    private MchNotifyRecordService mchNotifyRecordService;

    /**
     * 分页商户通知列表
     */
    @GetMapping(value="/page")
    @RamResource(action = "pay:mchNotify:list", name = "查询商户通知列表", type = ActionType.READ)
    public Resp<IPage<MchNotifyRecord>> page(MchNotifyQL req) {
        IPage<MchNotifyRecord> resp = mchNotifyRecordService.pageMchNotify(req);
        return Resp.ok(resp);
    }
}
